<?php
session_start();
if (isset($_SESSION['openid']) && isset($_POST['n'])){
    include_once("../c/config.php");
    $mysqli = new mysqli($dbhost, $dbuser, $dbpwd, $dbName);
    if (!$mysqli->set_charset("utf8")) {printf("Error loading character set utf8: %s\n", $mysqliTwo->error);}
    $openid=$_SESSION['openid'];
    $num=$_POST['n'];
    $mysqli->query("insert into yu(openid,num,createtime) values('".$openid."','".$num."','".date("Y-m-d H:i:s")."') ");
    echo 1;
}
?>
